home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / strlibs.zip / STREND.C < prev    next >
Text File  |  1993-01-04  |  495b  |  20 lines

  1.  
  2. /*  File   : strend.c
  3.     Author : Richard A. O'Keefe.
  4.     Updated: 23 April 1984
  5.     Defines: strend()
  6.  
  7.     strend(s) returns a character pointer to the NUL which ends s.  That
  8.     is,  strend(s)-s  ==  strlen(s). This is useful for adding things at
  9.     the end of strings.  It is redundant, because  strchr(s,'\0')  could
  10.     be used instead, but this is clearer and faster.
  11. */
  12.  
  13. char *strend(s)
  14.     register char *s;
  15.     {
  16.         while (*s++);
  17.         return s-1;
  18.     }
  19.  
  20.